import request from '@/utils/request'

// 查询云仓订阅渠道列表
export function listSubscribe(query) {
  return request({
    url: '/erp/subscribe/list',
    method: 'get',
    params: query
  })
}

// 查询云仓订阅渠道详细
export function getSubscribe(subscribeId) {
  return request({
    url: '/erp/subscribe/' + subscribeId,
    method: 'get'
  })
}

// 新增云仓订阅渠道
export function addSubscribe(data) {
  return request({
    url: '/erp/subscribe',
    method: 'post',
    data: data
  })
}

// 修改云仓订阅渠道
export function updateSubscribe(data) {
  return request({
    url: '/erp/subscribe',
    method: 'put',
    data: data
  })
}

// 删除云仓订阅渠道
export function delSubscribe(subscribeId) {
  return request({
    url: '/erp/subscribe/' + subscribeId,
    method: 'delete'
  })
}
//根据仓库id和仓库代号查询云仓订阅渠道信息
export function getInfos(depotId,depotCode){
  return request({
    url:'/erp/subscribe/LlistByCode/'+depotId+'/'+depotCode,
    method:'get'
  })
}
export function getChannelList(depotId){
  return request({
    url:'/erp/depot/getChanelList/'+depotId,
    method:'get'
  })
}
